@extends('wap.layouts.master')
@section('title','约战服务')

@section('content')

<div class="aw-main aw-match aw-match-add aw-pb170">
	<!--填写主队信息-开始-->
	<ul class="aw-assest-form aw-bg-fff">
		<li class="aw-form-li aw-form-li-title"><p>主队信息</p></li>
		<li class="aw-form-li">
			<div class="aw-left">我的球队</div>
			<div class="aw-conter aw-text-right">@{{team_info.name}}</div>
		</li>
		<li class="aw-form-li">
			<div class="aw-left">参赛人数</div>
			<div class="aw-conter aw-text-right">
				<input type="text" id="people_number" :value="team_info.people_number" v-model="team_info.people_number">
			</div>
		</li>
		<li class="aw-form-li">
			<div class="aw-left">平均年龄</div>
			<div class="aw-conter aw-text-right">
				<input type="text" id="avg_age" :value="team_info.avg_age" v-model="team_info.avg_age">
			</div>
		</li>
		<li class="aw-form-li">
			<div class="aw-left">队服颜色</div>
			<div class="aw-conter aw-text-right">
				<input type="text" id="colour" :value="team_info.colour" v-model="team_info.colour">
			</div>
		</li>
		<li class="aw-form-li aw-textarea">
			<div class="aw-left">主队要求</div>
			<div class="aw-conter">
				<textarea placeholder="请输入您的要求" id="desc" :value="team_info.desc" v-model="team_info.desc"></textarea>
			</div>
		</li>
	</ul>
	<!--填写主队信息-结束@{{info_selected}}
	@{{team_info}}-->
	
</div>
<div class="aw-match-vs">
	<!--vs信息-开始-->
	<ul class="aw-assest-list aw-assest-vs-match">
		<li class="aw-bg-fff aw-list-li">
			<div class="aw-li-title aw-vs-title">
				<div class="aw-title-left">@{{info_selected.date_info.month}}/@{{info_selected.date_info.day}}&nbsp;&nbsp;@{{info_selected.start_time}}-@{{info_selected.end_time}}</div>
				<div class="aw-title-right">@{{info_selected.storefront_name}}<span>｜</span>@{{info_selected.type_text}} (@{{info_selected.number}}号)</div>
			</div>
			<div class="aw-vs-desc">
				<div class="aw-vs-desc-zhandui aw-pr20">
					<span class="aw-desc-zhandui-img"><img :src="team_info.img ? team_info.img : '/img/default_160_160.png'" onerror="javascript:this.src='/img/default_160_160.png';"></span>
					@{{team_info.name}}
				</div>
				<div class="aw-vs-desc-zhandui aw-pl20">
					待定
				</div>
				<p class="aw-color-FF5450 aw-vs-desc-vs">VS</p>
			</div>
		</li>
	</ul>
	<!--vs信息-结束-->
</div>
<div class="aw-bg-191E1C aw-foot-btn aw-foot-btn1">
	合计：<span class="aw-color-2">￥@{{info_selected.price}}</span>
	<a href="javascript:;" v-on:click="Submit_Pay()" class="aw-assest-btn aw-btn-bgcolor-lvse">支付订单</a>
</div>


@section('pagejs')
@parent

<script type="text/javascript">
var info_selected=Get_Browser_Cache('info_order')
var user_info=Get_Browser_Cache('user_info')
var team_captain_id=user_info.team_captain_id;
var user_team_list=user_info.team_list.list;
var eq;
for(var i=0;i<user_team_list.length;i++){
	console.log(1111111111)
	var is_admin=user_team_list[i].is_admin;
	if(is_admin==1){
		eq=i;
	}
}
$.extend(info_selected,{team_info:user_team_list[eq]});
console.log(info_selected)
var Vue_Data={
	info_selected:info_selected,//已选场次
	team_info:info_selected.team_info,//球队信息
};
vm=new Vue({
	el:'#Vue-body',
	data:Vue_Data,
	methods:{
		Submit_Pay:function(){
			//立即预约
			if(!this.team_info.desc){
				msgTips('请填写客队要求');
				return;
			}else{
				this.info_selected.order_type=1;
				$.extend(this.info_selected,{team_info:this.team_info});
				Post_Browser_Cache('info_order',this.info_selected)
				location.href='/wap/pay/pay';
			}
		}
	}
})
</script>
@endsection

@endsection

